package com.net.xpay.common.helper;

import com.net.xpay.common.domain.partner.PartnerAccountDetail;
import com.net.xpay.core.enums.AccountBillType;
import com.net.xpay.core.enums.BillPayMethod;
import com.net.xpay.core.enums.PayStatus;
import org.springframework.stereotype.Component;

/**
 * 2020/5/11 14:36

 */
@Component
public class PartnerAccountDetailHelper {

    public void initCommonAccountDetail(PartnerAccountDetail accountDetail, AccountBillType type, Long accountMoney, String memo) {
        accountDetail.setType(type);
        accountDetail.setBillPayMethod(BillPayMethod.ALL_ACCOUNT);
        accountDetail.setPayStatus(PayStatus.WAIT_PAY);

        accountDetail.setMemo(memo != null ? memo : "");
        accountDetail.setAccountMoney(accountMoney);
    }
}
